Skip to content

feat: Adds RejctToken in TCK#2442

Merged
manishdait merged 3 commits into
hiero-ledger:mainfrom
aceppaluni:tokenreject
Jul 18, 2026
Merged

feat: Adds RejctToken in TCK#2442
manishdait merged 3 commits into
hiero-ledger:mainfrom
aceppaluni:tokenreject

Conversation

@aceppaluni

@aceppaluni aceppaluni commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description:

This PR adds support for the rejctToken TCK method

  • Added the RPC handler
  • Added the corresponding response class
  • Added a new dataclass

Related issue(s):

Fixes #2365
Closed PR #2396

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: aceppaluni <aceppaluni@gmail.com>
@aceppaluni
aceppaluni requested a review from a team as a code owner July 15, 2026 16:19
@aceppaluni
aceppaluni requested a review from manishdait July 15, 2026 16:19
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 343e39db-08b2-40a9-b28a-5ca3a8072396

📥 Commits

Reviewing files that changed from the base of the PR and between 8b49e3f and a4f2f5a.

📒 Files selected for processing (3)
  • tck/handlers/token.py
  • tck/param/token.py
  • tck/response/token.py

Walkthrough

Adds the rejectToken TCK RPC, including validated request parameters, Hedera TokenRejectTransaction construction for fungible and NFT tokens, receipt status validation, and a status-only response model.

Changes

Token rejection RPC

Layer / File(s) Summary
Reject token request and response contracts
tck/param/token.py, tck/response/token.py
Adds RejectTokenParams with list-of-string validation for token and serial IDs, plus RejectTokenResponse for the endpoint result.
Reject token transaction execution
tck/handlers/token.py
Registers rejectToken, builds the transaction from owner, token, and serial IDs, executes it, validates the receipt, and returns its status.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TCKClient
  participant reject_token
  participant TokenRejectTransaction
  participant TransactionReceipt
  TCKClient->>reject_token: RejectTokenParams
  reject_token->>TokenRejectTransaction: Construct transaction
  TokenRejectTransaction->>TransactionReceipt: Execute and retrieve receipt
  reject_token->>TCKClient: RejectTokenResponse with status
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The implementation adds the requested method and models, but the PR summary shows no tests for the required TCK suite. Add automated tests for src/tests/token-service/test-token-reject-transaction.ts and verify the handler against the TCK suite.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and points to the new rejectToken feature, even with the typo.
Description check ✅ Passed The description matches the PR and clearly describes the new rejectToken handler and related models.
Out of Scope Changes check ✅ Passed The changes stay within the requested rejectToken handler, parameter model, and response model scope.
📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #2365

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added approved Issue has been approved by team member scope: TCK involves engineering for the implementation of TCK method and module skill: advanced requires knowledge of multiple areas in the codebase without defined steps to implement or examples labels Jul 15, 2026
@aceppaluni aceppaluni added lang: python Uses Python programming language reviewer: maintainer PR needs a review from the maintainer team reviewer: committer request review help from a committer and removed approved Issue has been approved by team member labels Jul 15, 2026
@aceppaluni
aceppaluni requested review from manishdait and removed request for manishdait July 15, 2026 16:21
@github-actions github-actions Bot added open to community review PR is open for community review and feedback queue:junior-committer PR awaiting initial quality review labels Jul 15, 2026

@manishdait manishdait left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aceppaluni, just some small changes rest looks good to me

Comment thread tck/handlers/token.py Outdated
Comment thread tck/handlers/token.py Outdated
Comment thread tck/handlers/token.py Outdated
Signed-off-by: aceppaluni <aceppaluni@gmail.com>
@github-actions github-actions Bot added the approved Issue has been approved by team member label Jul 16, 2026
@aceppaluni
aceppaluni requested a review from manishdait July 17, 2026 15:45
@aceppaluni aceppaluni removed the approved Issue has been approved by team member label Jul 17, 2026

@manishdait manishdait left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions github-actions Bot added queue:committers PR awaiting committer technical review and removed queue:junior-committer PR awaiting initial quality review labels Jul 17, 2026
@aceppaluni aceppaluni added the status: update branch developer needs to click update branch label Jul 17, 2026
@exploreriii

Copy link
Copy Markdown
Contributor

Update please @aceppaluni

@github-actions github-actions Bot added status: ready-to-merge PR has 1+ maintainer and 2+ total approvals, ready to merge and removed queue:committers PR awaiting committer technical review labels Jul 17, 2026
@github-actions github-actions Bot added the approved Issue has been approved by team member label Jul 18, 2026
@manishdait
manishdait merged commit 69eec2a into hiero-ledger:main Jul 18, 2026
10 checks passed
@github-actions

Copy link
Copy Markdown

👋 Hi @aceppaluni! Great work completing a Advanced issue! 🎉

Thanks for your contribution! 🚀

Here are some issues you might want to explore next:

🌟 Stay connected:

Happy coding! 🚀
— Hiero Python SDK Team

@MonaaEid MonaaEid added this to the v0.2.9 milestone Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Issue has been approved by team member lang: python Uses Python programming language open to community review PR is open for community review and feedback reviewer: committer request review help from a committer reviewer: maintainer PR needs a review from the maintainer team scope: TCK involves engineering for the implementation of TCK method and module skill: advanced requires knowledge of multiple areas in the codebase without defined steps to implement or examples status: ready-to-merge PR has 1+ maintainer and 2+ total approvals, ready to merge status: update branch developer needs to click update branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add rejectToken method to tck module

4 participants